﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        public struct StructStudent
        {
            public string Name;
            public string Sex;
            public int Age;
            public string Addr;
            public void Show()
            {
                Console.WriteLine("Show()方法显示内容-->Name:{0},Sex:{1},Age:{2},Addr:{3}", Name, Sex, Age, Addr);
            }
            public StructStudent(string name, string sex, int age, string addr)
            {
                Name = name;
                Sex = sex;
                Age = age;
                Addr = addr;
            }
        }
        static void Main(string[] args)//栈
        {
            StructStudent stu;
            stu.Name = "冷榷";
            stu.Sex = "男";
            stu.Age = 22;
            stu.Addr = "冷之若霜，商之常榷";
            stu.Show();

            Console.WriteLine("main中Show()方法显示内容-->Name:{0},Sex:{1},Age:{2},Addr:{3}",stu.Name, stu.Sex, stu.Age, stu.Addr);
           

            StructStudent stu2 =new StructStudent("杰落心痕","女",18,"心若有痕何时平");
            stu2.Show();
            Console.WriteLine("stu2Show()方法显示内容-->Name:{0},Sex:{1},Age:{2},Addr:{3}", stu2.Name, stu2.Sex, stu2.Age, stu2.Addr);

            Console.ReadKey();
        }
    }
}
